<template>
    <div class="article">
        <div class="acticle-container" v-for="(item, i) in searchList" :key="item._id">
            <p>{{ item.title }}</p>
            <div class="imgs">
                <img :src="img" alt="" v-for="img in item.imageSrc" :key="img">
            </div>
            <div class="commentArea">
                <span>{{ item.cate_name }}</span>
                <span>{{ item.comment }}评论</span>
                <span>{{ timer[i] }}</span>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'detailList',
    props: ['searchList', 'timer']
}
</script>

<style lang="less" scoped>
.article {
    width: 100%;

    .acticle-container {
        width: 100%;
        height: 200px;
        border-bottom: 1px solid #ccc;

        p {
            margin-left: 10px;
            height: 20px;
            overflow: hidden;
        }

        .imgs {
            width: 100px;
            height: 100px;
            display: flex;

            img {
                width: 100%;
                height: 100%;
                margin: 5px 10px;
            }
        }

        span {
            margin: 0 10px;
        }

        .commentArea {
            width: 100%;
            margin-top: 20px;
        }
    }
}
</style>